-
Notifications
You must be signed in to change notification settings - Fork 7.3k
feat: error on user-injected bad images #8992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48502af5a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f41a982b03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if content | ||
| .iter() | ||
| .any(|item| matches!(item, ContentItem::InputImage { .. })) | ||
| { | ||
| return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Treating any user image as definitive can abort tool errors
This logic returns false as soon as the current turn contains any user input_image, even if the invalid image that triggered InvalidImageRequest actually came from a tool output. Now that view_image emits an input_image as a function-call output, it’s possible to have both a valid user image and an invalid tool image in the same turn; in that case the error handler will misclassify the failure as “user‑injected,” emit an error event, and stop the turn instead of retrying with the tool image replaced. That’s a regression from the previous behavior where tool-originated invalid images would be recoverable.
Useful? React with 👍 / 👎.
No description provided.